'''Class describing an mapfile input section'''
#!/usr/bin/env python
# -*- coding: utf-8 -*-

class InputSection(object):
    '''Class describing an mapfile input section'''
    def __init__(self, name="", address=0, size=0, origin="", symbols=None):
        '''Constructor'''
        self.name = name
        self.address = address
        self.size = size
        self.origin = origin
        self.symbols = symbols or []

    def setName(self, name):
        '''Setter for name'''
        self.name = name

    def setAddress(self, address):
        '''Setter for address'''
        self.address = address

    def setSize(self, size):
        '''Setter for section size'''
        self.size = size

    def setOrigin(self, origin):
        '''Setter for origin'''
        self.origin = origin

    def setSymbols(self, symbols):
        '''Setter for symbols'''
        self.symbols = symbols

    def addSymbol(self, symbol):
        '''Function for adding a symbol to the list'''
        self.symbols.append(symbol)
